3.179 \(\int x^2 (a+b \log (c x^n))^p (d+e \log (f x^r)) \, dx\)

Optimal. Leaf size=298 \[ 3^{-p-1} x^3 e^{-\frac {3 a}{b n}} \left (c x^n\right )^{-3/n} \left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \Gamma \left (p+1,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right )+e \left (-3^{-p-2}\right ) r x^3 e^{-\frac {3 a}{b n}} \left (c x^n\right )^{-3/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \Gamma \left (p+2,-\frac {3 a}{b n}-\frac {3 \log \left (c x^n\right )}{n}\right )-\frac {e 3^{-p-1} r x^3 e^{-\frac {3 a}{b n}} \left (c x^n\right )^{-3/n} \left (a+b \log \left (c x^n\right )\right )^{p+1} \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \Gamma \left (p+1,-\frac {3 a}{b n}-\frac {3 \log \left (c x^n\right )}{n}\right )}{b n} \]

[Out]

-3^(-2-p)*e*r*x^3*GAMMA(2+p,-3*a/b/n-3*ln(c*x^n)/n)*(a+b*ln(c*x^n))^p/exp(3*a/b/n)/((c*x^n)^(3/n))/(((-a-b*ln(
c*x^n))/b/n)^p)-3^(-1-p)*e*r*x^3*GAMMA(1+p,-3*a/b/n-3*ln(c*x^n)/n)*(a+b*ln(c*x^n))^(1+p)/b/exp(3*a/b/n)/n/((c*
x^n)^(3/n))/(((-a-b*ln(c*x^n))/b/n)^p)+3^(-1-p)*x^3*GAMMA(1+p,-3*(a+b*ln(c*x^n))/b/n)*(a+b*ln(c*x^n))^p*(d+e*l
n(f*x^r))/exp(3*a/b/n)/((c*x^n)^(3/n))/(((-a-b*ln(c*x^n))/b/n)^p)

________________________________________________________________________________________

Rubi [A]  time = 0.25, antiderivative size = 298, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {2310, 2181, 2366, 12, 15, 19, 6557} \[ 3^{-p-1} x^3 e^{-\frac {3 a}{b n}} \left (c x^n\right )^{-3/n} \left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \text {Gamma}\left (p+1,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right )+e \left (-3^{-p-2}\right ) r x^3 e^{-\frac {3 a}{b n}} \left (c x^n\right )^{-3/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \text {Gamma}\left (p+2,-\frac {3 a}{b n}-\frac {3 \log \left (c x^n\right )}{n}\right )-\frac {e 3^{-p-1} r x^3 e^{-\frac {3 a}{b n}} \left (c x^n\right )^{-3/n} \left (a+b \log \left (c x^n\right )\right )^{p+1} \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \text {Gamma}\left (p+1,-\frac {3 a}{b n}-\frac {3 \log \left (c x^n\right )}{n}\right )}{b n} \]

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*Log[c*x^n])^p*(d + e*Log[f*x^r]),x]

[Out]

-((3^(-2 - p)*e*r*x^3*Gamma[2 + p, (-3*a)/(b*n) - (3*Log[c*x^n])/n]*(a + b*Log[c*x^n])^p)/(E^((3*a)/(b*n))*(c*
x^n)^(3/n)*(-((a + b*Log[c*x^n])/(b*n)))^p)) - (3^(-1 - p)*e*r*x^3*Gamma[1 + p, (-3*a)/(b*n) - (3*Log[c*x^n])/
n]*(a + b*Log[c*x^n])^(1 + p))/(b*E^((3*a)/(b*n))*n*(c*x^n)^(3/n)*(-((a + b*Log[c*x^n])/(b*n)))^p) + (3^(-1 -
p)*x^3*Gamma[1 + p, (-3*(a + b*Log[c*x^n]))/(b*n)]*(a + b*Log[c*x^n])^p*(d + e*Log[f*x^r]))/(E^((3*a)/(b*n))*(
c*x^n)^(3/n)*(-((a + b*Log[c*x^n])/(b*n)))^p)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 15

Int[(u_.)*((a_.)*(x_)^(n_))^(m_), x_Symbol] :> Dist[(a^IntPart[m]*(a*x^n)^FracPart[m])/x^(n*FracPart[m]), Int[
u*x^(m*n), x], x] /; FreeQ[{a, m, n}, x] &&  !IntegerQ[m]

Rule 19

Int[(u_.)*((a_.)*(v_))^(m_)*((b_.)*(v_))^(n_), x_Symbol] :> Dist[(a^(m + n)*(b*v)^n)/(a*v)^n, Int[u*v^(m + n),
 x], x] /; FreeQ[{a, b, m, n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] && IntegerQ[m + n]

Rule 2181

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> -Simp[(F^(g*(e - (c*f)/d))*(c +
d*x)^FracPart[m]*Gamma[m + 1, (-((f*g*Log[F])/d))*(c + d*x)])/(d*(-((f*g*Log[F])/d))^(IntPart[m] + 1)*(-((f*g*
Log[F]*(c + d*x))/d))^FracPart[m]), x] /; FreeQ[{F, c, d, e, f, g, m}, x] &&  !IntegerQ[m]

Rule 2310

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)*x)/n)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rule 2366

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rule 6557

Int[Gamma[n_, (a_.) + (b_.)*(x_)], x_Symbol] :> Simp[((a + b*x)*Gamma[n, a + b*x])/b, x] - Simp[Gamma[n + 1, a
 + b*x]/b, x] /; FreeQ[{a, b, n}, x]

Rubi steps

\begin {align*} \int x^2 \left (a+b \log \left (c x^n\right )\right )^p \left (d+e \log \left (f x^r\right )\right ) \, dx &=3^{-1-p} e^{-\frac {3 a}{b n}} x^3 \left (c x^n\right )^{-3/n} \Gamma \left (1+p,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )-(e r) \int 3^{-1-p} e^{-\frac {3 a}{b n}} x^2 \left (c x^n\right )^{-3/n} \Gamma \left (1+p,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \, dx\\ &=3^{-1-p} e^{-\frac {3 a}{b n}} x^3 \left (c x^n\right )^{-3/n} \Gamma \left (1+p,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )-\left (3^{-1-p} e e^{-\frac {3 a}{b n}} r\right ) \int x^2 \left (c x^n\right )^{-3/n} \Gamma \left (1+p,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \, dx\\ &=3^{-1-p} e^{-\frac {3 a}{b n}} x^3 \left (c x^n\right )^{-3/n} \Gamma \left (1+p,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )-\left (3^{-1-p} e e^{-\frac {3 a}{b n}} r x^3 \left (c x^n\right )^{-3/n}\right ) \int \frac {\Gamma \left (1+p,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}}{x} \, dx\\ &=3^{-1-p} e^{-\frac {3 a}{b n}} x^3 \left (c x^n\right )^{-3/n} \Gamma \left (1+p,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )-\left (3^{-1-p} e e^{-\frac {3 a}{b n}} r x^3 \left (c x^n\right )^{-3/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}\right ) \int \frac {\Gamma \left (1+p,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right )}{x} \, dx\\ &=3^{-1-p} e^{-\frac {3 a}{b n}} x^3 \left (c x^n\right )^{-3/n} \Gamma \left (1+p,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )-\frac {\left (3^{-1-p} e e^{-\frac {3 a}{b n}} r x^3 \left (c x^n\right )^{-3/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}\right ) \operatorname {Subst}\left (\int \Gamma \left (1+p,-\frac {3 (a+b x)}{b n}\right ) \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=3^{-1-p} e^{-\frac {3 a}{b n}} x^3 \left (c x^n\right )^{-3/n} \Gamma \left (1+p,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )+\left (3^{-2-p} e e^{-\frac {3 a}{b n}} r x^3 \left (c x^n\right )^{-3/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}\right ) \operatorname {Subst}\left (\int \Gamma (1+p,x) \, dx,x,-\frac {3 a}{b n}-\frac {3 \log \left (c x^n\right )}{n}\right )\\ &=-3^{-2-p} e e^{-\frac {3 a}{b n}} r x^3 \left (c x^n\right )^{-3/n} \Gamma \left (2+p,-\frac {3 a}{b n}-\frac {3 \log \left (c x^n\right )}{n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}-3^{-1-p} e e^{-\frac {3 a}{b n}} r x^3 \left (c x^n\right )^{-3/n} \Gamma \left (1+p,-\frac {3 a}{b n}-\frac {3 \log \left (c x^n\right )}{n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (\frac {a}{b n}+\frac {\log \left (c x^n\right )}{n}\right )+3^{-1-p} e^{-\frac {3 a}{b n}} x^3 \left (c x^n\right )^{-3/n} \Gamma \left (1+p,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.40, size = 156, normalized size = 0.52 \[ -3^{-p-2} x^3 e^{-\frac {3 a}{b n}} \left (c x^n\right )^{-3/n} \left (a+b \log \left (c x^n\right )\right )^{p-1} \left (-\frac {a+b \log \left (c x^n\right )}{b n}\right )^{1-p} \left (3 \Gamma \left (p+1,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right ) \left (-a e r-b e r \log \left (c x^n\right )+b d n+b e n \log \left (f x^r\right )\right )-b e n r \Gamma \left (p+2,-\frac {3 \left (a+b \log \left (c x^n\right )\right )}{b n}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*Log[c*x^n])^p*(d + e*Log[f*x^r]),x]

[Out]

-((3^(-2 - p)*x^3*(a + b*Log[c*x^n])^(-1 + p)*(-((a + b*Log[c*x^n])/(b*n)))^(1 - p)*(-(b*e*n*r*Gamma[2 + p, (-
3*(a + b*Log[c*x^n]))/(b*n)]) + 3*Gamma[1 + p, (-3*(a + b*Log[c*x^n]))/(b*n)]*(b*d*n - a*e*r - b*e*r*Log[c*x^n
] + b*e*n*Log[f*x^r])))/(E^((3*a)/(b*n))*(c*x^n)^(3/n)))

________________________________________________________________________________________

fricas [F]  time = 0.69, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (e x^{2} \log \left (f x^{r}\right ) + d x^{2}\right )} {\left (b \log \left (c x^{n}\right ) + a\right )}^{p}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))^p*(d+e*log(f*x^r)),x, algorithm="fricas")

[Out]

integral((e*x^2*log(f*x^r) + d*x^2)*(b*log(c*x^n) + a)^p, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (e \log \left (f x^{r}\right ) + d\right )} {\left (b \log \left (c x^{n}\right ) + a\right )}^{p} x^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))^p*(d+e*log(f*x^r)),x, algorithm="giac")

[Out]

integrate((e*log(f*x^r) + d)*(b*log(c*x^n) + a)^p*x^2, x)

________________________________________________________________________________________

maple [F]  time = 1.44, size = 0, normalized size = 0.00 \[ \int \left (e \ln \left (f \,x^{r}\right )+d \right ) x^{2} \left (b \ln \left (c \,x^{n}\right )+a \right )^{p}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(b*ln(c*x^n)+a)^p*(e*ln(f*x^r)+d),x)

[Out]

int(x^2*(b*ln(c*x^n)+a)^p*(e*ln(f*x^r)+d),x)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))^p*(d+e*log(f*x^r)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: In function CAR, the value of the first argument is  0which is not
 of the expected type LIST

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int x^2\,\left (d+e\,\ln \left (f\,x^r\right )\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^p \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(d + e*log(f*x^r))*(a + b*log(c*x^n))^p,x)

[Out]

int(x^2*(d + e*log(f*x^r))*(a + b*log(c*x^n))^p, x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*ln(c*x**n))**p*(d+e*ln(f*x**r)),x)

[Out]

Timed out

________________________________________________________________________________________